import { BootScene } from './scenes/BootScene.js';
import { MainMenuScene } from './scenes/MainMenuScene.js';
import { GameScene } from './scenes/GameScene.js';
import { TestScene } from './scenes/TestScene.js';

const config = {
    type: Phaser.AUTO,
    width: 1280,
    height: 720,
    parent: 'game-container',
    scene: [BootScene, MainMenuScene, GameScene, TestScene],
    scale: {
        mode: Phaser.Scale.FIT,
        autoCenter: Phaser.Scale.CENTER_BOTH
    },
    physics: {
        default: 'arcade',
        arcade: {
            gravity: { y: 0 },
            debug: false
        }
    }
};

const game = new Phaser.Game(config);

// 全局游戏状态
window.gameState = {
    playerHealth: 100,
    playerEnergy: 3,
    deck: [],
    hand: [],
    discardPile: [],
    relics: [],
    floor: 1
};

// 全局事件发射器
window.eventEmitter = new Phaser.Events.EventEmitter();